//获取n天之前的日期
function getPreviousDate(n)
{
  let now = new Date()
  let date = {year:'',month:'',day:''}
  let previous = new Date(now.getTime()-n*24*3600*1000)
  date.year = previous.getFullYear()
  date.month = previous.getMonth()+1>9?previous.getMonth()+1 : "0"+(previous.getMonth()+1)
  date.day = previous.getDate()>9?previous.getDate():"0"+previous.getDate()
  date.hour = previous.getHours()>9?previous.getHours():"0"+previous.getHours()
  date.munite = previous.getMinutes()>9?previous.getMinutes():"0"+previous.getMinutes()
  date.second = previous.getSeconds()>9?previous.getSeconds():"0"+previous.getSeconds()
  return date
}

let today = getPreviousDate(0)
let previous = getPreviousDate(14)
let format_today = `${today.year}-${today.month}-${today.day} ${today.hour}:${today.munite}:${today.second}`
let format_question = `${previous.year}年${previous.month}月${previous.day}日至${today.month}月${today.day}日`
let format_today2 = `${today.year}-${today.month}-${today.day}`

let item_select = {
  health:[{label:'良好'},{label:`异常（发热，体温在37.3°C）`},
    {label:'异常（咳嗽）'},{label:'异常（头晕）'},
    {label:'异常（腹泻）'},{label:'异常（乏力）'},
    {label:'异常（同时含两种以上症状）'}],
  diagnosticResult:[{label:'新冠肺炎疑似病例'},{label:`新冠肺炎确诊病例`},
    {label:'其他病例'}],
  processingMethod:[{label:'住院'},{label:`继续观察`}],
  isArrivePlace:[{label:'是'},{label:`否`}],
  whichArea:[{label:`境外`},{label:'广东省广州市荔湾区'},{label:`广东省佛山市南海区`},
    {label:'广东省广州市番禺区'},{label:`广东省广州市海珠区`}, {label:'广东省广州市越秀区'},
    {label:`广东省广州市南沙区`},{label:'广东省广州市吴川区'},{label:`广东省广州市白云区`}],
  isTouchPerson:[{label:'是'},{label:`否`}],
  isTouchCase:[{label:'是'},{label:`否`}],
  isIsolation:[{label:'否'},{label:'是，居家隔离'},{label:`是，集中隔离`}],
  isInDongguan:[{label:'是'},{label:`否`}],
  isNewReturn:[{label:'是'},{label:`否`}],
  hasLeaveGuan:[{label:'否，留莞一直未出行'},{label:`否,一直在异地，期间暂未回莞`},{label:`否,期间新增回莞，未出行`},
    {label:'是，期间偶尔离莞，此时已回莞'},{label:`是，期间偶尔离莞，此时未回莞`}],
  isMainPerson:[{label:'否'},{label:`是，有疑似症状`},{label:`是，进14天途经疫情防控重点地区`},
    {label:'是，近14天曾接触过”近14天出入过疫情重点防控地区“'},{label:`是，近14天曾接触过疑似病例或确诊病例`}],
  famalySituation:[{label:'均无'},{label:`到达或途径疫情重点防控地区`},
    {label:'接触过近14天出入疫情重点防控地区的人员'},{label:`接触过疑似/确诊病例`},{label:'疑似/确诊冰凌'}],
  isInThoseCity:[{label:'否'},{label:`境外`},{label:'广东省广州市荔湾区'},{label:`广东省佛山市南海区`},
    {label:'广东省广州市番禺区'},{label:`广东省广州市海珠区`}, {label:'广东省广州市越秀区'},
    {label:`广东省广州市南沙区`},{label:'广东省广州市吴川区'},{label:`广东省广州市白云区`}]
}


export {
  format_today,
    format_today2,
  format_question,
    item_select
}
